package com.manage.system.api.feign;

import com.manage.common.core.constants.ServiceNameConstants;
import com.manage.system.api.dto.SysUserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author zhangqing
 * @version V1.0
 * @description 系统用户远程调用
 * @date 6/3/2021 4:21 PM
 */
@FeignClient(name = ServiceNameConstants.SYSTEM_SERVICE,path = "/user")
public interface RemoteSystemUser {

    /**
     * 根据登录用户名获取用户信息
     * @param loginName 登录名
     * @return 用户信息
     */
    @GetMapping("/loadByUsername")
    SysUserDto loadByUsername(@RequestParam(value = "loginName") String loginName);
}
